<!--{template header}-->

<!--{if $op == 'jobwant' || $op == 'jobring'}-->

	<!--{if $op=='jobring'}-->
	<div class="tabs_header">
		<ul class="tabs">
			<li class="active"><a href="cp.php?ac=hr"><span>发起船员招聘信息</span></a></li>
		</ul>
	</div>
	<!--{else}-->
	<div class="tabs_header">
		<ul class="tabs">
			<li class="active"><a href="cp.php?ac=hr"><span>发起船员求职信息</span></a></li>
		</ul>
	</div>
	<!--{/if}-->

	<div class="c_form">
		
		<form id="addnewpoll" name="addnewpoll" method="post" <!--{if $hr}-->action="cp.php?ac=hr&op=edit$op"<!--{else}-->action="cp.php?ac=hr&op=$op"<!--{/if}-->>
			<table cellspacing="4" cellpadding="4" width="100%" class="infotable">
				<tr>
					<th width="80">职务</th>
					<td>
						<input type="text" class="t_input" style="width:300px;" id="position" name="position" value="$hr[position]" /><br/>
					</td>
				</tr>
				<!--{if $op=='jobring'}-->
				<tr>
					<th>上船时间</th>
					<td>
						<script type="text/javascript" src="source/script_calendar.js" charset="$_SC[charset]"></script>
						<input type="text" class="t_input" size="16" id="toshiptime" readonly name="toshiptime" value="<!--{eval echo sgmdate('Y-m-d',$hr[toshiptime])}-->" onclick="showcalendar(event, this, 0, '<!--{eval echo sgmdate('Y-m-d',$_SGLOBAL[timestamp])}-->','<!--{eval echo sgmdate('Y-m-d', $_SGLOBAL[timestamp] + 3600 * 24 * 60)}-->')"/>前
					</td>
				</tr>
				<!--{/if}-->
				<tr>
					<th><!--{if $op=='jobring'}-->上船地点<!--{else}-->所在城市<!--{/if}--></th>
					<td id="citybox">
						<script type="text/javascript" src="source/script_city.js" charset="$_SC[charset]"></script>
						<script type="text/javascript" charset="$_SC[charset]">
							showprovince('province', 'city', '$hr[province]', 'citybox');
							showcity('city', '$hr[city]', 'province', 'citybox');
						</script>
					</td>
				</tr>

				<tr>
					<th>证书类型</th>
					<td>
						<select name="certificate">
							<option value="甲" <!--{if $hr[certificate] == '甲'}--> selected="selected"<!--{/if}-->>甲</option>
							<option value="乙" <!--{if $hr[certificate] == '乙'}--> selected="selected"<!--{/if}-->>乙</option>
							<option value="丙" <!--{if $hr[certificate] == '丙'}--> selected="selected"<!--{/if}-->>丙</option>
							<option value="丁" <!--{if $hr[certificate] == '丁'}--> selected="selected"<!--{/if}-->>丁</option>
						</select>
					</td>
				</tr>
				<tr>
					<th>证书级别</th>
					<td>
						<select name="cert_level">
							<option value="一" <!--{if $hr[cert_level] == '一'}--> selected="selected"<!--{/if}-->>一</option>
							<option value="二" <!--{if $hr[cert_level] == '二'}--> selected="selected"<!--{/if}-->>二</option>
							<option value="三" <!--{if $hr[cert_level] == '三'}--> selected="selected"<!--{/if}-->>三</option>
							<option value="内河" <!--{if $hr[cert_level] == '内河'}--> selected="selected"<!--{/if}-->>内河</option>
							<option value="其他" <!--{if $hr[cert_level] == '其他'}--> selected="selected"<!--{/if}-->>其他</option>
						</select>
					</td>
				</tr>

				<tr>
					<th>工作经验</th>
					<td>
						<input type="text" class="t_input"  style="width:60px;" name="ship_age" value="$hr[ship_age]" maxlength="30">年
					</td>
				</tr>

				<tr>
					<th>月薪</th>
					<td>
						<input type="text" class="t_input"  style="width:150px;" name="salary" value="$hr[salary]" maxlength="8">元
					</td>
				</tr>

				<tr>
					<th>载重吨位</th>
					<td>
						<input type="text" class="t_input"  style="width:150px;" name="dwt" value="$hr[dwt]" maxlength="120">
					</td>
				</tr>

				<tr>
					<th>船型</th>
					<td>
						<input type="text" class="t_input"  style="width:150px;" name="shiptype" value="$hr[shiptype]" maxlength="120">
					</td>
				</tr>

				<tr>
					<th>航线</th>
					<td>
						<input type="text" class="t_input"  style="width:200px;" name="regional_route" value="$hr[regional_route]" maxlength="120">
					</td>
				</tr>
				<!--{if $op=='jobring'}-->
				<tr>
					<th>截止时间</th>
					<td>
						<script type="text/javascript" src="source/script_calendar.js" charset="$_SC[charset]"></script>
						<input type="text" class="t_input"name="endtime" readonly id="endtime" value="<!--{eval echo sgmdate('Y-m-d', $hr[endtime])}-->"  onclick="showcalendar(event,this,0,'<!--{eval echo sgmdate('Y-m-d', $_SGLOBAL[timestamp])}-->', '<!--{eval echo sgmdate('Y-m-d', $_SGLOBAL[timestamp] + 3600 * 24 * 60)}-->')" />
					</td>
				</tr>
				<!--{/if}-->
				<tr>
					<th>备注</th>
					<td><textarea id="beizhu" style="padding: 3px 2px;width:450px;height:80px;" name="beizhu">$hr[beizhu]</textarea> </td>
				</tr>

				<tr>
					<th style="vertical-align: top;" width="90">请填写验证码</th>
					<td>
						<script>seccode();</script>
						<p>请输入上面的4位字母或数字，看不清可<a href="javascript:updateseccode()">更换一张</a></p>
						<input type="text" id="seccode" name="seccode" value="" size="15" class="t_input" />
					</td>
				</tr>

				<tr>
					<th></th>
					<td>
						<input type="hidden" name="makefeed" id="makefeed" value="1" />
						<input type="hidden" name="id" id="id" value="$hr[id]" />
						<input type="hidden" <!--{if $hr}-->name="edit$op" id="edit$op"<!--{else}-->name="job$op" id="job$op"<!--{/if}--> value="true" />
						<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
						<input type="submit" name="addpollsubmit" id="addpollsubmit" value="提交" class="submit" onclick="return validate(this);" />
						<div id="__addnewpoll"></div>
					</td>
				</tr>
			</table>
		</form>

	</div>
	<script type="text/javascript" charset="$_SC[charset]">
		function validate(obj) {
		    var position = $('position');
		    if (position) {
		    	var slen = strlen(position.value);
		        if (slen < 1 || slen > 80) {
		            alert("标题长度(1~80字符)不符合要求");
		            position.focus();
		            return false;
		        }
		    }

			var nowDate = parsedate("<!--{date('Y-m-d',$_SGLOBAL[timestamp])}-->");

			if($('endtime').value.Trim() != "") {
				var endtime = parsedate($('endtime').value.Trim());
				if(endtime < nowDate) {
					alert("截止时间不能小于当前时间");
					return false;
				}
			}
			if($('toshiptime').value.Trim() != "") {
				var endtime = parsedate($('toshiptime').value.Trim());
				if(endtime < nowDate) {
					alert("上船时间不能小于当前时间");
					return false;
				}
			}

		    if($('seccode')) {
				var code = $('seccode').value;
				var x = new Ajax();
				x.get('cp.php?ac=common&op=seccode&code=' + code, function(s){
					s = trim(s);
					if(s.indexOf('succeed') == -1) {
						alert(s);
						$('seccode').focus();
		           		return false;
					}
				});
		    }
		    //ajaxpost('addnewpoll', 'poll_post_result');
		}
		String.prototype.Trim = function() { 
			return this.replace(/(^\s*)|(\s*$)/g, ""); 
		}
	</script>

<!--{elseif $op == 'hrbring' || $op == 'hrwanted'}-->

	<!--{if $op=='hrbring'}-->
	<div class="tabs_header">
		<ul class="tabs">
			<li class="active"><a href="cp.php?ac=hr"><span>发起航运招聘信息</span></a></li>
		</ul>
	</div>
	<!--{else}-->
	<div class="tabs_header">
		<ul class="tabs">
			<li class="active"><a href="cp.php?ac=hr"><span>发起航运求职信息</span></a></li>
		</ul>
	</div>
	<!--{/if}-->

	<div class="c_form">
		
		<form id="addnewpoll" name="addnewpoll" method="post" <!--{if $hr}-->action="cp.php?ac=hr&op=edit$op"<!--{else}-->action="cp.php?ac=hr&op=$op"<!--{/if}-->>
			<table cellspacing="4" cellpadding="4" width="100%" class="infotable">
				<tr>
					<th width="80">职位名称</th>
					<td>
						<input type="text" class="t_input" style="width:450px;" id="position" name="position" value="$hr[position]" /> <br/>
					</td>
				</tr>

				<tr>
					<th>工作地点</th>
					<td id="citybox">
						<script type="text/javascript" src="source/script_city.js" charset="$_SC[charset]"></script>
						<script type="text/javascript" charset="$_SC[charset]">
							showprovince('province', 'city', '$hr[province]', 'citybox');
							showcity('city', '$hr[city]', 'province', 'citybox');
						</script>
					</td>
				</tr>

				<tr>
					<th>学历</th>
					<td>
						<select name="edu">
							<option value="小学" <!--{if $hr[edu] == '小学'}--> selected="selected"<!--{/if}-->>小学</option>
							<option value="初中" <!--{if $hr[edu] == '初中'}--> selected="selected"<!--{/if}-->>初中</option>
							<option value="高中" <!--{if $hr[edu] == '高中'}--> selected="selected"<!--{/if}-->>高中</option>
							<option value="大专" <!--{if $hr[edu] == '大专'}--> selected="selected"<!--{/if}-->>大专</option>
							<option value="本科以上" <!--{if $hr[edu] == '本科以上'}--> selected="selected"<!--{/if}-->>本科以上</option>
						</select>
					</td>
				</tr>

				<tr>
					<th>工作经验</th>
					<td>
						<input type="text" class="t_input"  style="width:150px;" name="work_age" value="$hr[work_age]" maxlength="120">年
					</td>
				</tr>

				<tr>
					<th>薪资</th>
					<td>
						<input type="text" class="t_input"  style="width:150px;" name="salary" value="$hr[salary]" maxlength="120">
					</td>
				</tr>

				<tr>
					<th>证书</th>
					<td>
						<input type="text" class="t_input"  style="width:450px;" name="certificate" value="$hr[certificate]" maxlength="120">
					</td>
				</tr>
				<!--{if $op=='hrwanted'}-->
				<tr>
					<th>个人介绍</th>
					<td><textarea id="beizhu" style="padding: 3px 2px;width:450px;height:50px;" name="beizhu">$hr[beizhu]</textarea> </td>
				</tr>
				<tr>
					<td colspan="2" height="1px"><div style="width: 550px; height:1px; border-bottom:1px solid #DDDDDD;"></div></td>
				</tr>
				<tr>
					<th>其他要求</th>
					<td><textarea id="claim" style="padding: 3px 2px;width:450px;height:50px;" name="claim">$hr[claim]</textarea> </td>
				</tr>
				<tr>
					<td colspan="2" height="1px"><div style="width: 550px; height:1px; border-bottom:1px solid #DDDDDD;"></div></td>
				</tr>
				<!--{else}-->
				<tr>
					<th>招聘人数</th>
					<td>
						<input type="text" class="t_input"  style="width:80px;" name="num" value="$hr[num]" maxlength="10">
					</td>
				</tr>
				<tr>
					<th>岗位职责</th>
					<td><textarea id="duty" style="padding: 3px 2px;width:450px;height:50px;" name="duty">$hr[duty]</textarea> </td>
				</tr>
				<tr>
					<th>职位要求</th>
					<td><textarea id="claim" style="padding: 3px 2px;width:450px;height:50px;" name="claim">$hr[claim]</textarea> </td>
				</tr>
				<tr>
					<td colspan="2" height="1px"><div style="width: 550px; height:1px; border-bottom:1px solid #DDDDDD;"></div></td>
				</tr>
				<tr>
					<th>截止时间</th>
					<td>
						<script type="text/javascript" src="source/script_calendar.js" charset="$_SC[charset]"></script>
						<input type="text" name="endtime" id="endtime" value="<!--{eval echo sgmdate('Y-m-d', $hr[endtime])}-->"  onclick="showcalendar(event,this,0,'<!--{eval echo sgmdate('Y-m-d', $_SGLOBAL[timestamp])}-->', '<!--{eval echo sgmdate('Y-m-d', $_SGLOBAL[timestamp] + 3600 * 24 * 60)}-->')" />
					</td>
				</tr>
				<!--{/if}-->

				<tr>
					<th style="vertical-align: top;" width="90">请填写验证码</th>
					<td>
						<script>seccode();</script>
						<p>请输入上面的4位字母或数字，看不清可<a href="javascript:updateseccode()">更换一张</a></p>
						<input type="text" id="seccode" name="seccode" value="" size="15" class="t_input" />
					</td>
				</tr>

				<tr>
					<th></th>
					<td>
						<input type="hidden" name="makefeed" id="makefeed" value="1" />
						<input type="hidden" name="id" id="id" value="$hr[id]" />
						<input type="hidden" <!--{if $hr}-->name="edit$op" id="edit$op"<!--{else}-->name="job$op" id="job$op"<!--{/if}--> value="true" />
						<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
						<input type="submit" name="addpollsubmit" id="addpollsubmit" value="提交" class="submit" onclick="return validate(this);" />
						<div id="__addnewpoll"></div>
					</td>
				</tr>
			</table>
		</form>

	</div>
	<script language="javascript" charset="$_SC[charset]" type="text/javascript" src="source/script_hr&bs.js"></script>

<!--{elseif $op == 'delete'}-->
<h1>删除信息</h1>
<a href="javascript:hideMenu();" class="float_del" title="关闭">关闭</a>
<div class="popupmenu_inner" id="__delform_{$hrid}">
	<form method="post" id="delform_{$hrid}" name="delform_{$hrid}" action="cp.php?ac=hr&op=delete">
	<p>您确定删除这条信息吗？</p>
	<p class="btn_line">
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]">
		<input type="hidden" name="deletesubmit" value="true" />
		<input type="hidden" name="infoid" value="$hrid" />
		<input type="hidden" name="sudo" value="$fc" />
		<button name="atsubmit_btn" type="button" class="submit" value="true" onclick="ajaxpost('delform_{$hrid}', 'hide_li', 1000)">确定</button>
	</p>
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	</form>
</div>

<!--{/if}-->

<!--{template footer}-->